<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:replace="_fragments::head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="../../static/css/semantic.min.css">
    <link rel="stylesheet" href="../../static/css/me.css">

    <title>标签管理</title>
</head>


<body>

<!--导航-->
<nav th:replace="admin/_fragments::menu(3)" class="ui inverted attached segment"></nav>

<!--二级导航-->
<div class="ui attached pointing menu">
    <div class="ui container">
        <div class="right menu">
            <a th:href="@{/admin/tag/save}" href="tag-input.html" class="item">编辑</a>
            <a th:href="@{/admin/tag}" href="tag.html" class="teal active item">列表</a>
        </div>
    </div>
</div>


<!--中间内容-->
<div class="m-padded-tb-big m-container-small">
    <div class="ui container">
        <!--操作成功提示信息-->
        <!--/*/
        <div th:unless="${#strings.isEmpty(message)}" class="ui success message">
            <i class="close icon"></i>
            <div class="header">提示：</div>
            <p th:text="${message}">恭喜，操作成功！</p>
        </div>
        /*/-->
        <!--标签列表-->
        <table class="ui compact teal celled table">
            <thead>
            <tr>
                <th>行号</th>
                <th>名称</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="tag,iterStat : ${page.content}">
                <td th:text="${iterStat.count}">1</td>
                <td th:text="${tag.name}">编程</td>
                <td>
                    <a href="#" th:href="@{/admin/tag/update/{id}(id=${tag.id})}" class="ui mini teal basic button">
                        修改
                    </a>
                    <a href="#" th:href="@{/admin/tag/delete/{id}(id=${tag.id})}" class="ui mini red basic button">
                        删除
                    </a>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <th colspan="3">
                    <div th:if="${page.totalPages}>1" class="ui mini pagination menu">
                        <a th:href="@{/admin/tag(page=${page.number}-1)}" class="item" th:unless="${page.first}">
                            上一页
                        </a>
                        <a th:href="@{/admin/tag(page=${page.number}+1)}" class="item" th:unless="${page.last}">
                            下一页
                        </a>
                    </div>
                    <a th:href="@{/admin/tag/save}" href="tag-input.html"
                       class="ui mini right floated teal basic button">
                        新增
                    </a>
                </th>
            </tr>
            </tfoot>
        </table>
    </div>
</div>


<!--/*/<th:block th:replace="admin/_fragments::script">/*/-->
<script src="../../static/js/jquery.min.js"></script>
<script src="../../static/js/semantic.min.js"></script>
<!--/*/</th:block>/*/-->

</body>
</html>